wutt 5 gadi atpakaļ
vecāks
revīzija
5d27afe8fd

+ 1 - 1
pcbms/src/main/java/com/hssx/pcbms/controller/GoodsController.java

@@ -45,7 +45,7 @@ public class GoodsController {
      * name :名称,tagId:标签id,modelNumber:模具型号,company:公司
      * ,address:地址,pic:产品图片文件路径,serviceLife:服务期限(天),
      * nextIndate:下次维护日期,number:数量
-     * factory:供应商,content:备注
+     * factory:供应商,content:备注,goodsSequence:资产序列, deviceContactPhone:设备联系人电话,deviceContact:设备联系人
      * projectNo:项目编号,projectName:项目名称,purchaseDate,采购日期(如:2015-12-09),warrantyPeriod:质保期限:单位(年)
      * price:采购价格
      * @return

+ 2 - 2
pcbms/src/main/java/com/hssx/pcbms/controller/PersonScoreController.java

@@ -36,8 +36,8 @@ public class PersonScoreController {
      */
     @ApiOperation(value = "打个人分/修改个人打分", notes = "打个人分/修改个人打分")
     @RequestMapping("/addOrUpdate")
-    public HttpRespMsg addOrUpdate(PersonScore personScore) {
-        return personScoreService.addOrUpdate(personScore);
+    public HttpRespMsg addOrUpdate(PersonScore personScore,double total) {
+        return personScoreService.addOrUpdate(personScore,total);
     }
 
     /**

+ 1 - 1
pcbms/src/main/java/com/hssx/pcbms/service/PersonScoreService.java

@@ -14,7 +14,7 @@ import com.hssx.pcbms.util.HttpRespMsg;
  */
 public interface PersonScoreService extends IService<PersonScore> {
 
-    HttpRespMsg addOrUpdate(PersonScore personScore);
+    HttpRespMsg addOrUpdate(PersonScore personScore,double total);
 
     HttpRespMsg fiveList();
 }

+ 5 - 3
pcbms/src/main/java/com/hssx/pcbms/service/impl/PersonScoreServiceImpl.java

@@ -32,7 +32,7 @@ public class PersonScoreServiceImpl extends ServiceImpl<PersonScoreMapper, Perso
     @Resource
     private ScoreMapper scoreMapper;
     @Override
-    public HttpRespMsg addOrUpdate(PersonScore personScore) {
+    public HttpRespMsg addOrUpdate(PersonScore personScore,double total) {
         HttpRespMsg msg = new HttpRespMsg();
         Integer personScoreInit = 0;
         if (personScore.getId() == null) {
@@ -40,13 +40,15 @@ public class PersonScoreServiceImpl extends ServiceImpl<PersonScoreMapper, Perso
             personScoreMapper.insert(personScore);
             Score score = new Score();
             score.setScoreId(personScore.getScoreId());
-            score.setPersonalScore(personScoreInit+personScore.getCan()+personScore.getDiligence()+personScore.getVirtue()+personScore.getPerformance());
+            score.setTotal(total);
+            score.setPersonalScore(personScoreInit+personScore.getCan()+personScore.getDiligence()+personScore.getVirtue()+personScore.getPerformance()+personScore.getLian());
             scoreMapper.update(score,new QueryWrapper<Score>().eq("score_id",personScore.getScoreId()));
         }else{
             personScoreMapper.updateById(personScore);
             Score score = new Score();
             score.setScoreId(personScore.getScoreId());
-            score.setPersonalScore(personScoreInit+personScore.getCan()+personScore.getDiligence()+personScore.getVirtue()+personScore.getPerformance());
+            score.setTotal(total);
+            score.setPersonalScore(personScoreInit+personScore.getCan()+personScore.getDiligence()+personScore.getVirtue()+personScore.getPerformance()+personScore.getLian());
             scoreMapper.update(score,new QueryWrapper<Score>().eq("score_id",personScore.getScoreId()));
         }
         return msg;